﻿<UserControl x:Class="Project.RegisterDeclarationContent"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
            Height="843" Width="900" xmlns:my="clr-namespace:CustomControls;assembly=CustomControls"
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
    <UserControl.Resources>
        <DataTemplate x:Key="QuestionItemTemplate">
            <Border Width="807" Height="Auto" BorderBrush="#69810E" BorderThickness="0,0,0,1">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Name="QuestionNum" Width="Auto" Margin="3,0,0,0" Text="{Binding Path=NumberOfQuestion, StringFormat='\{0}.-'}" />
                    <TextBlock Width="300" TextWrapping="Wrap" Margin="3,0,0,0" Text="{Binding Question}" ToolTip="Pregunta"/>
                    <TextBlock Width="435" TextWrapping="Wrap" Margin="10,0,0,0" Text="{Binding Path=Answer, StringFormat='-> R: {0}' }"  ToolTip="Respuesta" />
                    <Button ToolTip="Eliminar pregunta" VerticalAlignment="Center" HorizontalAlignment="Center" Name="btnDelete" Click="btnDelete_Click">
                        <Button.Style>
                            <Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
                                <Setter Property="Visibility" Value="Hidden" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}},Path=IsMouseOver}" Value="True">
                                        <Setter Property="Visibility" Value="Visible" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Button.Style>
                        <Image VerticalAlignment="Center" HorizontalAlignment="Center" Source="Images/delete.gif" Width="25" Height="25"></Image>
                    </Button>
                </StackPanel>
            </Border>
        </DataTemplate>
    </UserControl.Resources>
    <Grid VerticalAlignment="Top" Name="ContentGrid" HorizontalAlignment="Left" Width="900" Height="843">
        <xctk:ChildWindow Name="SearchPopUp" IsModal="True" Caption="Debe seleccionar una denuncia para poder continuar" HorizontalContentAlignment="Center" 
                          VerticalContentAlignment="Center"/>
        <GroupBox Header="Datos Personales" Height="236" HorizontalAlignment="Left" Margin="36,81,0,0" Name="PersonInfo" VerticalAlignment="Top" Width="805">
            <Grid Name="PersonalInfo">
                <Label Content="*Nombre:" Height="28" HorizontalAlignment="Left" Margin="10,15,0,0" Name="lblName" VerticalAlignment="Top" />
                <Label Content="*Apellido paterno:" Height="28" HorizontalAlignment="Left" Margin="10,49,0,0" Name="lblLastName" VerticalAlignment="Top" />
                <Label Content="*Apellido materno:" Height="28" HorizontalAlignment="Left" Margin="10,83,0,0" Name="lblMiddleName" VerticalAlignment="Top" />
                <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" Margin="66,14,0,0" MaxLength="50" Name="tbActorName" RegEx="^[A-Za-z'áéíóúAÉÍÓÚÑñ\s]+$" VerticalAlignment="Top" Width="196" />
                <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" Margin="111,46,0,0" MaxLength="30" Name="tbActorLastName" RegEx="^[A-Za-z'áéíóúAÉÍÓÚÑñ\s]+$" VerticalAlignment="Top" Width="196" />
                <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" Margin="113,83,0,0" MaxLength="30" Name="tbActorMiddleName" RegEx="^[A-Za-z'áéíóúAÉÍÓÚÑñ\s]+$" VerticalAlignment="Top" Width="196" />
                <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" Margin="391,83,0,0" MaxLength="50" Name="tbActorZone" RegEx="^[A-Za-z'áéíóúAÉÍÓÚÑñ\s]+$" VerticalAlignment="Top" Width="192" />
                <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" Margin="405,14,0,0" MaxLength="8" Name="tbActorPhone" RegEx="^[0-9]+$" VerticalAlignment="Top" Width="136" />
                <Label Content="*CI/Pasaporte:" Height="28" HorizontalAlignment="Left" Margin="10,117,0,0" Name="lblCI" VerticalAlignment="Top" />
                <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" Margin="86,117,0,0" MaxLength="10" Name="tbActorCI" RegEx="^[0-9]+$" VerticalAlignment="Top" Width="106" />
                <ComboBox Height="23" HorizontalAlignment="Left" Margin="431,118,0,0" Name="cboxActorCountry" VerticalAlignment="Top" Width="162" />
                <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" Margin="458,150,0,0" MaxLength="30" Name="tbActorWorkPlace" RegEx="^[A-Za-z0-9#°.'áéíóúAÉÍÓÚÑñ\s]+$" VerticalAlignment="Top" Width="196" />
                <Label Content="*Lugar de Trabajo:" Height="28" HorizontalAlignment="Left" Margin="356,153,0,0" Name="lblJob" VerticalAlignment="Top" Width="100" />
                <Label Content="Zona:" Height="28" HorizontalAlignment="Left" Margin="356,83,0,0" Name="lblZone" VerticalAlignment="Top" />
                <Label Content="Nacionalidad:" Height="28" HorizontalAlignment="Left" Margin="353,121,0,0" Name="lblCharacter" VerticalAlignment="Top" />
                <Label Content="Teléfono:" Height="28" HorizontalAlignment="Left" Margin="353,17,0,0" Name="lblPhone" VerticalAlignment="Top" />
                <Label Content="*Estado Civil:" Height="28" HorizontalAlignment="Left" Margin="353,51,0,0" Name="label35" VerticalAlignment="Top" />
                <my:ValidationComboBox SelectedValuePath="Content" Height="23" HorizontalAlignment="Left" Margin="426,49,0,0" Name="cbActorCivilStatus" SelectedIndex="-1" VerticalAlignment="Top" Width="162">
                    <ComboBoxItem Content="Soltero(a)" />
                    <ComboBoxItem Content="Casado(a)" />
                    <ComboBoxItem Content="Divorciado(a)" />
                    <ComboBoxItem Content="Conviviente" />
                    <ComboBoxItem Content="Separado(a)" />
                    <ComboBoxItem Content="Viudo(a)" />
                </my:ValidationComboBox>
                <my:MaskTextBox DataType="RegEx" Height="23" HorizontalAlignment="Left" Margin="69,150,0,0" MaxLength="80" Name="tbActorAddress" RegEx="^[A-Za-z0-9#°.'áéíóúAÉÍÓÚÑñ\s]+$" VerticalAlignment="Top" Width="266" />
                <Label Content="Direccion: " Height="28" HorizontalAlignment="Left" Margin="10,150,0,0" Name="label3" VerticalAlignment="Top" />
            </Grid>
        </GroupBox>
        <Label Content="*Declarante:" FontSize="14" FontWeight="Light" Height="28" HorizontalAlignment="Left" Margin="33,46,0,0" Name="label2" VerticalAlignment="Top" />
        <RadioButton GroupName="DeclarantPerson" Content="Victima" Height="16" HorizontalAlignment="Left" Margin="108,48,0,0" Name="rbtnVictim" VerticalAlignment="Top" Checked="rbtnVictim_Checked" />
        <RadioButton Content="Denunciante" GroupName="DeclarantPerson" Height="16" Margin="174,48,0,0" Name="rbtnComplainant" VerticalAlignment="Top" HorizontalAlignment="Left" Width="88" Checked="rbtnComplainant_Checked" />
        <RadioButton Content="Informante" GroupName="DeclarantPerson" Height="16" HorizontalAlignment="Left" Margin="268,48,0,0" Name="rbtnInformer" VerticalAlignment="Top" Width="82" Checked="rbtnInformer_Checked" />
        <RadioButton Content="Agresor" GroupName="DeclarantPerson" Height="16" HorizontalAlignment="Left" Margin="356,48,0,0" Name="rbtnAggressor" VerticalAlignment="Top" Width="64" Checked="rbtnAggressor_Checked" />
        <RadioButton Content="Testigo" GroupName="DeclarantPerson" Height="16" HorizontalAlignment="Left" Margin="426,48,0,0" Name="rbtnWitness" VerticalAlignment="Top" Width="56" Checked="rbtnWitness_Checked" />
        <Border BorderBrush="#BABABA" BorderThickness="1" Height="140" HorizontalAlignment="Left" Margin="36,347,0,0" Name="bord" VerticalAlignment="Top" Width="805">
            <Grid>
                <TextBlock Height="20" Name="textBlock1" Margin="20,20,0,0" HorizontalAlignment="Left" Text="La persona con las generales de ley arriba registradas, a horas:" VerticalAlignment="Top" Width="336" />
                <TextBlock Height="23" HorizontalAlignment="Left" Margin="478,20,0,0" Name="textBlock2" Text="Del dia de hoy: " VerticalAlignment="Top" />
                <Label Content="Label" Height="28" HorizontalAlignment="Left" FontWeight="Bold" Margin="560,20,0,0" Name="lblTodayDate" VerticalAlignment="Top" />
                <TextBlock Height="23" HorizontalAlignment="Left" Margin="20,46,0,0" Name="textBlock3" Text="Se presentó en las oficinas de la brigada de protección a la familia, para prestar su declaración informativa policial sobre el caso N°:" VerticalAlignment="Top" />
                <Label Content="Label" Height="28" HorizontalAlignment="Left" Margin="718,47,0,0" FontWeight="Bold" Name="lblCaseNum" VerticalAlignment="Top" />
                <TextBlock Height="23" HorizontalAlignment="Left" Margin="20,75,0,0" Name="textBlock4" Text="De violencia familiar en contra de:" VerticalAlignment="Top" />
                <Label Content="Label" Height="28" HorizontalAlignment="Left" Margin="205,75,0,0" FontWeight="Bold"  Name="lblAggressor" VerticalAlignment="Top" />
                <TextBlock Height="23" HorizontalAlignment="Left" Margin="20,104,0,0" Name="textBlock5" Text="Exortada(o) a  decir la verdad de los hechos manifiesto lo siguiente." VerticalAlignment="Top" />
                <Label Content="Label" FontWeight="Bold" Height="28" HorizontalAlignment="Left" Margin="355,20,0,0" Name="lblCurrentTime" VerticalAlignment="Top" />
            </Grid>
        </Border>
        <Button Content="REGISTRAR" Height="41" HorizontalAlignment="Left" Margin="643,761,0,0" Name="btnRegister" VerticalAlignment="Top" Width="136" Click="btnRegister_Click" />
        <Label Content="" Foreground="Red" Height="28" HorizontalAlignment="Left" Margin="487,48,0,0" Name="lblSelError" VerticalAlignment="Top" />
        <Label Content="*" FontSize="18" Foreground="Red" Height="16" HorizontalAlignment="Left" Margin="691,48,0,0" Name="label6" VerticalAlignment="Top" />
        <Label Content="Todos los campos marcados con" Foreground="Gray" Height="16" HorizontalAlignment="Left" Margin="515,48,0,0" Name="label7" VerticalAlignment="Top" />
        <Label Content="son obligatorios" Foreground="Gray" Height="20" HorizontalAlignment="Left" Margin="702,48,0,0" Name="label8" VerticalAlignment="Top" />
        <ListBox Height="134" HorizontalAlignment="Left" ItemTemplate="{StaticResource QuestionItemTemplate}" ItemsSource="{Binding ShowableQuestions}" Margin="34,596,0,0" Name="listBoxQuestions" VerticalAlignment="Top" Width="824" />
        <Button Height="35" HorizontalAlignment="Left" Margin="33,528,0,0" Name="btnAddQuestion" VerticalAlignment="Top" Width="152" Click="btnAddQuestion_Click" >
            <StackPanel Orientation="Horizontal">
                <TextBlock Height="20" Text="AGREGAR PREGUNTA" />
                <Image Height="20" Margin="5,0,0,0" Source="Images/add.gif" Width="20" />
            </StackPanel>
        </Button>
        <Label Content="Debe agregar por lo menos una pregunta!" Foreground="Red" Height="19" HorizontalAlignment="Left" Margin="110,576,0,0" Name="lblNoQuestionsError" Visibility="Hidden" VerticalAlignment="Top" />
        <Grid Background="White" Height="238" HorizontalAlignment="Left" Margin="205,517,0,0" Name="gridAddQuestion" VerticalAlignment="Top" Width="605">
            <Border BorderBrush="#5C5C5C" BorderThickness="1">
                <Grid>
                    <Button Click="btnAddSuccess_Click" Content="AGREGAR" Height="23" HorizontalAlignment="Left" Margin="318,197,0,0" Name="btnAddSuccess" VerticalAlignment="Top" Width="75" />
                    <Button Click="btnAddCancel_Click" Content="CANCELAR" Height="23" HorizontalAlignment="Left" Margin="202,197,0,0" Name="btnAddCancel" VerticalAlignment="Top" Width="75" />
                    <Label Content="La pregunta y la respuesta deben tener al menos 15 caracteres" Foreground="Red" Height="18" HorizontalAlignment="Left" Margin="161,20,0,0" Name="lblQuestionERROR" VerticalAlignment="Top" Visibility="Hidden" />
                    <Label Content="*Pregunta " FontSize="16" FontWeight="Light" Height="28" HorizontalAlignment="Left" Margin="26,18,0,0" Name="label4" VerticalAlignment="Top" />
                    <my:MaskTextBox DataType="RegEx" MaxLength="70" RegEx="^[A-Za-z0-9#°?¿,.'áéíóúAÉÍÓÚÑñ\s]+$" Height="23" Margin="26,43,0,0" Name="tbQuestion" VerticalAlignment="Top" HorizontalAlignment="Left" Width="547" />
                    <Label Content="*Respuesta:" FontSize="16" FontWeight="Light" Height="28" HorizontalAlignment="Left" Margin="26,77,0,0" Name="label5" VerticalAlignment="Top" />
                    <my:MaskTextBox TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" AcceptsReturn="True" IsUndoEnabled="True" DataType="RegEx" Height="83" HorizontalAlignment="Left" Margin="26,101,0,0" MaxLength="250" Name="tbResponse" RegEx="^[A-Za-z0-9#°,.'áéíóúAÉÍÓÚÑñ\s]+$" VerticalAlignment="Top" Width="547" />
                    <Label Content="" Height="28" FontSize="16" FontWeight="Light" HorizontalAlignment="Left" Margin="99,18,0,0" Name="lblQuestionNumber" VerticalAlignment="Top" />
                </Grid>
            </Border>
        </Grid>
        <Label Content="*Preguntas:" Height="20" FontSize="14" FontWeight="Light" HorizontalAlignment="Left" Margin="34,574,0,0" Name="lblQuestionsTitle" VerticalAlignment="Top" />
        <Label Content="Numero de Caso:" FontSize="20" FontWeight="Normal" Height="28" HorizontalAlignment="Left" Margin="36,8,0,0" Name="label28" VerticalAlignment="Top" />
        <Label Content="" FontSize="32" FontWeight="Light" Height="45" HorizontalAlignment="Left" Margin="194,-1,0,0" Name="lblCaseNumber" VerticalAlignment="Top" />
        <Label Content="Fecha de Registro de Declaracion:" FontSize="20" FontWeight="Normal" Height="28" HorizontalAlignment="Left" Margin="284,9,0,0" Name="label39" VerticalAlignment="Top" />
        <Label Content="11/11/2011" FontSize="18" FontWeight="Normal" Height="28" HorizontalAlignment="Left" Margin="588,12,0,0" Name="lblRegistrationDate" VerticalAlignment="Top" />
    </Grid>
</UserControl>
